package com.czl.elm.controller;

import com.czl.elm.util.ActionResult;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

@RestController
@RequestMapping("/time")
public class TimeController {
    @ApiOperation("获取当前年月日时分秒")
    @GetMapping("/getLocalDateTime")
    public ActionResult getLocalDateTime(){
        return ActionResult.success("获取成功", LocalDateTime.now());
    }
    @ApiOperation("获取当前年月日")
    @GetMapping("/getLocalDate")
    public ActionResult getLocalDate(){
        return ActionResult.success("获取成功", LocalDate.now());
    }
    @ApiOperation("获取当前时分秒")
    @GetMapping("/getLocalTime")
    public ActionResult getLocalTime(){
        return ActionResult.success("获取成功", LocalTime.now());
    }


}
